package com.wz.jiangsu.controller.es;

import com.wz.jiangsu.bean.vo.resp.PageResult;
import com.wz.jiangsu.bean.vo.resp.R;
import com.wz.jiangsu.bean.vo.show.DealWithEvent;
import com.wz.jiangsu.service.es.ESDealEventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dealEvent")
public class ESDealEventController {

    @Autowired
    private ESDealEventService service;

    /**
     * 通过 uuid 查询指定索引返回数据
     * @param uuid
     * @param index
     * @return
     */
    @GetMapping("/get/findByUUid")
    public R<PageResult<DealWithEvent>>
    getListByUUId(@RequestParam("uuid") String uuid, String index) {
        return service.findByUUid(uuid,index);
    }
}
